import request from '@/utils/request'

// 查询课文列表
export function listText(query) {
  return request({
    url: '/recitation_admin/text/list',
    method: 'get',
    params: query
  })
}

// 查询课文详细
export function getText(textId) {
  return request({
    url: '/recitation_admin/text/' + textId,
    method: 'get'
  })
}

// 新增课文
export function addText(data) {
  return request({
    url: '/recitation/text',
    method: 'post',
    data: data
  })
}

// 修改课文
export function updateText(data) {
  return request({
    url: '/recitation/text',
    method: 'put',
    data: data
  })
}

// 删除课文
export function delText(textId) {
  return request({
    url: '/recitation/text/' + textId,
    method: 'delete'
  })
}
